<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Class: tinymce.html.Styles</title>
<meta name="generator" content="MoxieDoc" />

<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/grids.css" />
<link rel="stylesheet" type="text/css" href="css/general.css" />

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
	google.load("jquery", "1.3");
</script>
<script type="text/javascript" src="js/jquery.treeview.min.js"></script>
<script type="text/javascript" src="js/general.js"></script>
</head>
<body>
<div class="classDetailsContent">
<h1>tinymce.html.Styles</h1>
<table class="classDetails">
<tr>
<td class="first">Namespace</td>
<td class="last">tinymce.html</td>
</tr>
<tr>
<td class="first">Class</td>
<td class="last">Styles</td>
</tr>
</table>
<div class="classDescription">This class is used to parse CSS styles it also compresses styles to reduce the output size.
</div>
<div class="version">
<span>Version:</span>3.4</div>
<h4>Example</h4>
<pre class="brush: js;"/>
<div class="summaryLists">
<h2>Public Methods</h2>
<table class="Methods summary">
<thead>
<tr>
<th>Method</th>
<th>Defined By</th>
</tr>
</thead>
<tbody>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Styles.html#parse">parse</a>(css:String):Object</div>
<div class="summary">Parses the specified style value into an object collection.</div>
</td>
<td class="last">Styles</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Styles.html#serialize">serialize</a>(styles:Object, element_name:String):String</div>
<div class="summary">Serializes the specified style object into a string.</div>
</td>
<td class="last">Styles</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Styles.html#toHex">toHex</a>(color:String):String</div>
<div class="summary">Parses the specified RGB color value and returns a hex version of that color.</div>
</td>
<td class="last">Styles</td>
</tr>
</tbody>
</table>
</div>
<div class="detailsList">
<div class="details">
<h2>Method details</h2>
<div class="memberDetails" id="parse">
<h3>parse<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function parse(css:String):Object</code>
<div class="memberDescription">Parses the specified style value into an object collection. This parser will also
merge and remove any redundant items that browsers might have added. It will also convert non hex
colors to hex values. Urls inside the styles will also be converted to absolute/relative based on settings.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">css:String</td>
<td class="last">Style value to parse for example: border:1px solid red;.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">Object - Object representation of that style like {border : '1px solid red'}</div>
</div>
<div class="memberDetails" id="serialize">
<h3>serialize<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function serialize(styles:Object, element_name:String):String</code>
<div class="memberDescription">Serializes the specified style object into a string.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">styles:Object</td>
<td class="last">Object to serialize as string for example: {border : '1px solid red'}</td>
</tr>
<tr>
<td class="first">element_name:String</td>
<td class="last">Optional element name, if specified only the styles that matches the schema will be serialized.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">String - String representation of the style object for example: border: 1px solid red.</div>
</div>
<div class="memberDetails last" id="toHex">
<h3>toHex<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function toHex(color:String):String</code>
<div class="memberDescription">Parses the specified RGB color value and returns a hex version of that color.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">color:String</td>
<td class="last">RGB string value like rgb(1,2,3)</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">String - Hex version of that RGB value like #FF00FF.</div>
</div>
</div>
</div>
</div>
</body>
</html>
